package cn.xinfei.xdecision.common.service.datax.datainterface.v2;

import cn.xinfei.xdecision.common.model.common.requestParam.QueryListParam;
import cn.xinfei.xdecision.common.model.datax.datainterface.v2.VarInterfaceInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;

import java.util.Collection;
import java.util.List;
import java.util.Map;

public interface VarInterfaceInfoService extends IService<VarInterfaceInfo> {

    Map<String,List<String>> selectChargedApiAndVarsByVarCodes(Collection<String> varCodes);

    Map<String,List<String>> selectFreeApiAndVarsByVarCodes(Collection<String> varCodes);

    Map<String,List<String>> selectAllApiAndVarsByVarCodes(Collection<String> varCodes);

    Map<String,List<String>> selectAllApiAndVarsByVarCodes();

    VarInterfaceInfo selectInterfaceById(Long id);

    List<VarInterfaceInfo> SelectAllInterface();

    List<Long> selectVirtualDataSourceIdsByIds(Collection<Long> ids);

    List<String> selectTypesByIds(Collection<Long> ids);


    VarInterfaceInfo insert(VarInterfaceInfo interfaceVo);

    VarInterfaceInfo update(VarInterfaceInfo interfaceVo);

    //更新接口
    boolean updateStatus(Long id, Integer status);

    //删除接口
    boolean deleteByPrimaryKey(VarInterfaceInfo interfaceVo);

    PageInfo queryByEntity(QueryListParam<VarInterfaceInfo> interfaceListParam);

    List<VarInterfaceInfo> getInterfaceList(Long organId);

    Map<String, List<String>> getApiAndVarsFromFeeAttrDataSources(Collection<String> varCodes, List<Long> dataSourceList);


}
